<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
  <cpn :c-message="message" :c-movies="movies"></cpn>
</div>

<template id="cpn">
  <div>
    <h1>{{cMovies}}</h1>
    <h1>{{cMessage}}</h1>
  </div>
</template>

<script src="../js/vue.js"></script>
<script>


  //let(变量)和const(常量)
  const app = new Vue({
    el: '#app',
    data: {
      message: '中华人民牛蛙！',
      movies: ['尼罗河上的惨案','东方快车谋杀案','死亡之约']
    },
    components: {
      cpn: {
        template: `#cpn`,
        props: {
          cMovies: {
            type: Array,
            default() {
              return [];
            }
          },
          cMessage: {
            type: String,
            default: ''
          }
        }
      }
    }
  })
</script>
</body>
</html>